// 企业类型
export const enterpriseType = [
  { value: 0, label: "有限责任公司" },
  { value: 1, label: "股份有限公司" },
  { value: 2, label: "个人独资企业" },
  { value: 3, label: "合伙企业" },
  { value: 4, label: "全民所有制企业" },
  { value: 5, label: "集体所有制企业" },
  { value: 6, label: "农民专业合作社" },
];
// 授信状态
export const creditType = [
  { value: 0, label: "待补充资料" },
  { value: 1, label: "待平台审核" },
  { value: 2, label: "待银行审核" },
  { value: 3, label: "待平台确认金额" },
  { value: 4, label: "已完成" },
];

// 销售申请下拉状态
// export const salesSelectType = [
//   { value: "", label: "全部" },
//   { value: 1, label: "待审核" },
//   { value: 2, label: "待签约" },
//   { value: 3, label: "待平台审批" },
//   { value: 4, label: "待资方确认" },
//   { value: 5, label: "待银行确认" },
//   { value: 6, label: "放款中" },
//   { value: 7, label: "放款中" },
//   { value: 0, label: "已驳回" },
//   { value: 8, label: "已完成" },
// ];

// 销售申请列表状态
export const salesTableType = [
  { value: 1, label: "待审核" },
  { value: 2, label: "待签约" },
  { value: 3, label: "待平台审批" },
  { value: 4, label: "待资方确认" },
  { value: 5, label: "待银行确认" },
  { value: 6, label: "入库中" }, // 待上传保证金 确认缴纳保证金 车辆入库 上传车手续
  { value: 7, label: "放款中" }, // 待银行放款
  { value: 8, label: "已完成" },
  { value: 0, label: "已驳回" },
];

// 角色名称
export const userType = [
  { value: 0, label: "供应商" },
  { value: 1, label: "平台" },
  { value: 2, label: "担保公司" },
  { value: 3, label: "资方(银行)" },
];

// 商品列表状态
export const productType = [
  { value: 0, label: "待审批" },
  { value: 1, label: "已驳回" },
  { value: 2, label: "已上架" },
  { value: 3, label: "已下架" },
];
// 出口列表状态
export const exportType = [
  // { value: 1, label: "待审批" },
  // { value: 2, label: "待上传出口保证金" },
  // { value: 3, label: "办理出口手续" },
  // { value: 4, label: "报关中" },
  // { value: 5, label: "车辆待核销" },
  // { value: 6, label: "运输中" },
  // { value: 7, label: "退税中" },
  // { value: 8, label: "已完成" },  
  // { value: 0, label: "已驳回" },
  { value: 1, label: "待审批" },
  { value: 2, label: "待上传出口保证金" },
  { value: 3, label: "待平台审核出口保证金" },
  { value: 4, label: "支付上牌费和检测费" },
  { value: 5, label: "办理出口手续" }, // 平台办理
  { value: 6, label: "支付报关费和装箱费" },
  { value: 7, label: "报关中" },
  { value: 8, label: "运输中" },
  { value: 9, label: "已到港" },
  { value: 10, label: "已完成" },
  { value: 0, label: "已驳回" },
];

// 币种
export const currencyType = [
  { value: "RMB", label: "RMB" },
  { value: "USD", label: "USD" },
];

// 成交方式
export const termsDeliveryType = [
  {
    code: "CIF",
    list: [
      { value: "合同后支付", label: "合同后支付" },
      { value: "报关完成", label: "报关完成" },
      { value: "见海运提单", label: "见海运提单" },
      { value: "车辆到达目的港", label: "车辆到达目的港" },
    ],
  },
  {
    code: "FOB",
    list: [
      { value: "合同后支付", label: "合同后支付" },
      { value: "出口手续办理完成付款", label: "出口手续办理完成付款" }
    ],
  },
];

// 付汇方式
export const paymentMethod = [
  { value: "TT", label: "TT" },
  { value: "L/C", label: "L/C" },
];
// 出口订单费用
export const exportOrderExpenseType = [
  { value: 4, label: "检测费" },
  { value: 5, label: "上牌费" },
  { value: 6, label: "报关费" },
  { value: 7, label: "装箱费" },
  { value: 11, label: "额外费用" }, //自定义
];
// 其他费用
export const otherExpensesType = [
  { value: 8, label: "国内仓储费" },
  { value: 9, label: "平台服务费" },
];
// 费用类型
export const expenseType = [
  { value: 1, label: "保证金" },
  { value: 2, label: "贷款" },
  { value: 3, label: "利息" },
  { value: 10, label: "出口保证金" },
  ...exportOrderExpenseType,
  ...otherExpensesType,
];
// 各类全部账单状态
export const billType = [
  { value: 0, label: "未支付" },
  { value: 1, label: "已支付" },
  { value: 2, label: "待确认" },
];
// 贷款账单
export const loanBillType = [
  { value: 0, label: "未还款" },
  { value: 1, label: "已还款，待确认" },
  { value: 2, label: "已完成" }
];
// 退税状态
export const drawbackType = [
  { value: 0, label: "退税中" },
  { value: 1, label: "已退税" },
];
// 船运单,装箱照片,报关单,海运提单,箱单
export const exportFileType = [
  { value: 0, label: "船运单" ,list:[]},
  { value: 1, label: "装箱照片" ,list:[]},
  { value: 2, label: "出口报关单" ,list:[]},
  { value: 3, label: "海运提单" ,list:[]},
  { value: 4, label: "箱单" ,list:[]},
];
// 付款方式 支付方式
export const paymentMethodType = [
  { value: 0, label: "余额" },
  { value: 1, label: "线下支付" }, // 上传凭证
  { value: 2, label: "微信" },
];
// 出口手续
export const exportFormalitiesType = [
  { value: 0, label: "车辆手续" },
  { value: 1, label: "车辆检测报告" },
  { value: 2, label: "车辆转移待出口" },
];
// 仓库照片
export const warehouseType = [
  { value: 0, label: "入库" },
  { value: 1, label: "出库" },
];
// 订单状态
export const orderType = [
  { value: 1, label: "待确认" },
  { value: 2, label: "待进口商确认" },
  { value: 3, label: "待平台审核" },
  { value: 4, label: "待签约" },
  { value: 5, label: "待发货" },
  { value: 6, label: "货运中" },
  { value: 7, label: "已到港" },
  { value: 8, label: "提车申请" },
  { value: 9, label: "已提车" },
  { value: 10, label: "已完成" },
  { value: 0, label: "已取消" }
];
export const orderLogisticsType = [
  { value: 0, label: "车辆准备中" },
  { value: 1, label: "车辆准备中" },
  { value: 2, label: "车辆准备中" },
  { value: 3, label: "车辆准备中" },
  { value: 4, label: "车辆准备中" },
  { value: 5, label: "办理出口手续" },
  { value: 6, label: "报关中" },
  { value: 7, label: "报关中" },
  { value: 8, label: "运输中" },
  { value: 9, label: "已到港" },
  { value: 10, label: "已完成" },
];
// 发货申请状态
export const deliveryType =  [
  { value: 0, label: "待审核" },
  { value: 1, label: "已通过" },
  { value: 2, label: "已驳回" },
]
// 提车申请状态
export const deliveryOfVehicleType = [
  { value: 0, label: "待确认" },
  { value: 1, label: "平台确认中" },
  { value: 2, label: "已确认" }
]
// 车款结算状态
export const carPaymentType = [
  { value: 0, label: "待结算" },
  { value: 1, label: "结算中" },
  { value: 2, label: "已结算" }
]
// 根据lable查询value
export const getStatusLabel = (list, value) => {
  const item = list.find((x) => x.value === value);
  if (item && item.label) return item.label;
  return "";
};
